import ajax from '/utils/ajax.js'
App({
  onLaunch: function () {
    // 登录
    wx.login({
      success: res => {
        console.log('login: ' , res)
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
    wx.getSystemInfo({
      success: (res) => {
        console.log('getSystemInfo ',res)
        if (res.version < '6.6.3') {
          wx.showToast({
            title: '请先升级微信版本，再使用',
            icon: 'none',
            duration: 2000
          })
        }
        var system = res.system;
        system = system.split(' ')[0];
        this.globalData.mobile = {
          system: system,
          model: res.model
        }
      }
    })
  },
  globalData: {
    userInfo: null,
    testUrl: "https://gray-crm.chuangchuang.cn", //测试专用
    baseUrl: 'http://bl.7yue.pro/v1',
    // appkey: 'TixS4uiLBIXd9qP0',
    // appkey: 'j51Pil6UokAy2WPS',
    //appkey: 'mGjRHM9FmdTV55oL',
    appkey: 'uI0tejiudto5Mvqd' //勿删除

  }
})